package com.ruoyi.youtian.controller;

import com.ruoyi.Gzmx_device.domain.Gzmx_device;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.ShiroUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author bl
 */
@Controller
@RequestMapping("/page-route-new")
public class PageRouteNewController {


    // 模型管理2
    @GetMapping("/template-management")
    public String templateManagement(){
        return  "youtianNew/templateManagement/templateManagement";
    }
    @GetMapping("/template-management/add")
    public String templateManagementAdd(){
        return  "youtianNew/templateManagement/add";
    }
    @GetMapping("/template-management/remove")
    public String templateManagementRemove(){
        return  "youtianNew/templateManagement/remove";
    }
    @GetMapping("/template-management/edit")
    public String templateManagementEdit(){
        return  "youtianNew/templateManagement/edit";
    }

    // 基础管理
    @GetMapping("/basics-mangement")
    public String basicsMangement(){
        return  "youtianNew/basicsMangement/basicsMangement";
    }
    @GetMapping("/basics-mangement/add")
    public String basicsMangementAdd(){
        return  "youtianNew/basicsMangement/add";
    }
    @GetMapping("/basics-mangement/edit")
    public String basicsMangementEdit(){
        return  "youtianNew/basicsMangement/edit";
    }

    // 场景管理
    @GetMapping("/scene-management")
    public String sceneManagement(){
        return  "youtianNew/sceneManagement/sceneManagement";
    }
    // 新增场景 - yang xiao xing
//    @GetMapping("/scene-management-add/{parentId}")
    @GetMapping("/scene-management-add")
    public String sceneManagementAdd(@PathVariable("parentId") Long id){
        return  "youtianNew/sceneManagement/add";
    }
    // 编辑场景 - yang xiao xing
    @GetMapping("/scene-management-edit/{sceneId}")
    public String sceneManagementEdit(@PathVariable("sceneId") Long id,ModelMap mmap){
        mmap.put("scene", id);
        return  "youtianNew/sceneManagement/edit";
    }
//    @RequiresPermissions("Gzmx_device:Gzmx_device:edit")
//    @GetMapping("/edit/{id}")
//    public String edit(@PathVariable("id") Long id, ModelMap mmap)
//    {
//        Gzmx_device gzmx_device = gzmx_deviceService.selectGzmx_deviceById(id);
//        mmap.put("gzmx_device", gzmx_device);
//        SysUser currentUser = ShiroUtils.getSysUser();
//        mmap.put("currentUser", currentUser);
//        SysDept dept=deptService.selectDeptById(currentUser.getDeptId());
//        mmap.put("dept", dept);
//        return prefix + "/edit";
//    }



    // 实时监测
    @GetMapping("/real-time-monitoring")
    public String realTimeMonitoring(){
        return  "tongjiNew/realTimeMonitoring/realTimeMonitoring";
    }
    // 场景类型监测
    @GetMapping("/scene-category-monitoring")
    public String sceneCategoryMonitoring(){
        return  "tongjiNew/sceneCategoryMonitoring/sceneCategoryMonitoring";
    }
    // 故障分析报告
    @GetMapping("/fault-analysis-report")
    public String faultAnalysisReport(){
        return  "tongjiNew/faultAnalysisReport/faultAnalysisReport";
    }
    // 预警设置
    @GetMapping("/forecast-settings")
    public String forecastSettings(){
        return  "tongjiNew/forecastSettings/forecastSettings";
    }
    // 预警监控
    @GetMapping("/early-warning-monitoring")
    public String earlyWarninMmonitoring(){
        return  "tongjiNew/earlyWarninMmonitoring/earlyWarninMmonitoring";
    }
    // 预警查询
    @GetMapping("/early-warning-query")
    public String earlyWarningQuery(){
        return  "tongjiNew/earlyWarningQuery/earlyWarningQuery";
    }

    // 统计分析频率设置
    @GetMapping("/analysis-frequency-set")
    public String analysisFrequencySet(){
        return  "tongjiNew/analysisFrequencySet/analysisFrequencySet";
    }

    // 统计分析频率编辑
    @GetMapping("/analysis-frequency-set/edit/{id}")
    public String analysisFrequencySetEdit(@PathVariable("id") long id, ModelMap mmap){
        mmap.put("id",id);
        return  "tongjiNew/analysisFrequencySet/edit";
    }

    // 采集数据点位管理
    @GetMapping("/gzmxSourceTagManagement")
    public String gzmxSourceTagManagement(){
        return  "youtianNew/gzmxSourceTagManagement/gzmxSourceTagManagement";
    }


}
